<!DOCTYPE html>
<html lang="en" class="no-js">
  <script src="https://cdn.jsdelivr.net/npm/clipboard@1/dist/clipboard.min.js"></script>
  <head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
  <meta name="generator" content="Hugo 0.55.6" />

  <meta name="ROBOTS" content="INDEX, FOLLOW" />

  <link rel="alternate" type="application/rss&#43;xml" href="/index.xml" />

  <link rel="shortcut icon" href="/assets/favicons/favicon.ico" />
  <link rel="apple-touch-icon" href="/assets/favicons/apple-touch-icon.png" sizes="180x180" />
  <link rel="icon" type="image/png" href="/assets/favicons/favicon-16x16.png" sizes="16x16" />
  <link rel="icon" type="image/png" href="/assets/favicons/favicon-32x32.png" sizes="32x32" />
  <link rel="icon" type="image/png" href="/assets/favicons/android-144x144.png" sizes="36x36" />
  <link rel="icon" type="image/png" href="/assets/favicons/android-144x144.png" sizes="48x48" />
  <link rel="icon" type="image/png" href="/assets/favicons/android-144x144.png" sizes="72x72" />
  <link rel="icon" type="image/png" href="/assets/favicons/android-144x144.png" sizes="96x96" />
  <link rel="icon" type="image/png" href="/assets/favicons/android-144x144.png" sizes="144x144" />
  <link rel="icon" type="image/png" href="/assets/favicons/android-192x192.png" sizes="192x192" />

  <title>Architecture | Meshery</title>
  <meta property="og:title" content="Architecture" />
  <meta property="og:description"
    content="overview of different individual components of Meshery architecture and how they interact as a system." />
  <meta property="og:type" content="website" />
  <meta property="og:url" content="http://localhost:4000" />
  <meta property="og:site_name" content="http://localhost:4000" />
  <meta property="og:image"
    content="https://raw.githubusercontent.com/meshery/meshery/master/docs/assets/img/meshery-cncf-twitter.png" />

  <meta itemprop="name" content="Architecture" />
  <meta itemprop="description"
    content="overview of different individual components of Meshery architecture and how they interact as a system." />

  <meta name="twitter:card" content="summary" />
  <meta name="twitter:title" content="Architecture" />
  <meta name="twitter:description"
    content="overview of different individual components of Meshery architecture and how they interact as a system." />
  <meta name="twitter:image"
    content="https://raw.githubusercontent.com/meshery/meshery/master/docs/assets/img/meshery-cncf-twitter.png" />
  
    <!-- <link rel="stylesheet" href="/assets/css/palette.css" /> -->
  <!-- <link rel="stylesheet" href="/assets/css/anchorjs.css" /> -->
  <link rel="stylesheet" href="/assets/css/sass.css" />
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.css" />

  <!-- Google Tag Manager -->
  <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-PCGTC98C');</script>

  <!-- End Google Tag Manager -->
  
  
  <script src="https://code.jquery.com/jquery-3.3.1.min.js"
    integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/js/jquery.tablesorter.min.js"
    integrity="sha512-qzgd5cYSZcosqpzpn7zF2ZId8f/8CHmFKZ8j7mU4OUXTNRd5g+ZHBPsgKEwoqxCtdQvExE5LprwwPAgoicguNg=="
    crossorigin="anonymous" referrerpolicy="no-referrer"></script>



  <!-- Anchorjs included for adding hover anchor links to headings -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.2.2/anchor.min.js"></script>
  <script>
    $(function () {
      /** AnchorJS options and selector */
      anchors.options = {
        visible: "hover",
        placement: "right",
      };
      anchors.add("h1, h2, h3, h4, h5");
    });
    // Function to handle anchor links
    document.addEventListener('click', function (event) {
      if (event.target.tagName === 'A' && event.target.getAttribute('href').startsWith('#')) {
        window.location.hash = event.target.getAttribute('href');
      }
    });
  </script>
</head>
 <header>
  <nav class="js-navbar-scroll navbar">
    <a class="navbar-brand" href="/">
      <div class="navbar-logo">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1703.46 182.75"><defs><style>.cls-1{fill:#00d3a9;}.cls-2{fill:#00b39f;}.cls-3{fill:#3c494f;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M96,43.12V86.7l38.52-21.91Z"/><path class="cls-1" d="M96,95.82v43.92l38.87-21.9Z"/><path class="cls-2" d="M90.43,86.47v-43L52.38,64.91Z"/><path class="cls-2" d="M14,139.51a93,93,0,0,0,29.56,29.21v-46Z"/><path class="cls-2" d="M90.42,139.51V96.17L52.25,117.84Z"/><path class="cls-1" d="M49.08,166,87.72,144.3,49.08,122.4Z"/><path class="cls-2" d="M137.57,166.21V122.63L98.94,144.31Z"/><path class="cls-2" d="M175.4,134.5a89.15,89.15,0,0,0,10.94-39.13L146.07,118Z"/><path class="cls-1" d="M143.13,113.28,182,91.49,143.13,69.7Z"/><path class="cls-2" d="M137.56,60.23V17L99.15,38.56Z"/><path class="cls-2" d="M137.55,113.05V69.47L99,91.26Z"/><path class="cls-1" d="M49.08,69.36v44L88,91.26Z"/><path class="cls-2" d="M90.43,0a93.2,93.2,0,0,0-41,10.61l41,23Z"/><path class="cls-1" d="M49.08,16.65V60.46L88,38.56Z"/><path class="cls-2" d="M43.55,14A91.83,91.83,0,0,0,14,43.23L43.55,60V14Z"/><path class="cls-1" d="M137.32,10.84A94.71,94.71,0,0,0,96,0V34Z"/><path class="cls-1" d="M0,94.57a89.28,89.28,0,0,0,11.17,40.27l29.91-17Z"/><path class="cls-1" d="M11.17,47.91A90.17,90.17,0,0,0,0,88.06L41.08,64.91l-30-17Z"/><path class="cls-2" d="M49.47,172a93.47,93.47,0,0,0,41,10.61V149l-41,22.93Z"/><path class="cls-1" d="M172.46,43.35a93,93,0,0,0-29.33-29.09V60Z"/><path class="cls-1" d="M143.13,168.6a91.72,91.72,0,0,0,29.45-29.31l-29.45-16.66v46Z"/><path class="cls-2" d="M186.42,87.72A89.58,89.58,0,0,0,175.36,48L145.68,64.79Z"/><path class="cls-1" d="M96,182.75a93.24,93.24,0,0,0,41-10.61L96,148.87Z"/><path class="cls-2" d="M43.55,112.94V69.81L5.38,91.26Z"/><path class="cls-3" d="M784.8,56.17v92H889.85v-22h-83V104.6h63.94v-22H806.81V61.05h83v-22H784.8Z"/><path class="cls-3" d="M379.53,56.17v92H485v-22H402V104.6H465.9v-22H402V61.05H485v-22H379.53Z"/><path class="cls-3" d="M630.74,119.66a23.83,23.83,0,0,1-2.49,11,28.89,28.89,0,0,1-6.22,9,35.86,35.86,0,0,1-9.14,6.1,27.83,27.83,0,0,1-11.21,2.44H497.87V125.36H601.68a5.38,5.38,0,0,0,4.15-1.63,5.15,5.15,0,0,0,1.66-4.07v-9a5.15,5.15,0,0,0-1.66-4.07,5.38,5.38,0,0,0-4.15-1.63H526.94a25.15,25.15,0,0,1-11.22-2.44,29.55,29.55,0,0,1-9.13-6.11,34.86,34.86,0,0,1-6.23-8.95,23.86,23.86,0,0,1-2.49-11v-9a23.79,23.79,0,0,1,2.49-11,34.74,34.74,0,0,1,6.23-9,35.37,35.37,0,0,1,9.13-6.1,25.15,25.15,0,0,1,11.22-2.45h103.8v23.2H526.94a5.42,5.42,0,0,0-4.16,1.63A5.19,5.19,0,0,0,521.12,68v9A5.2,5.2,0,0,0,522.78,81a5.41,5.41,0,0,0,4.16,1.62h74.74a25.11,25.11,0,0,1,11.21,2.45,35.6,35.6,0,0,1,9.14,6.1,34.71,34.71,0,0,1,6.22,9,26.4,26.4,0,0,1,2.49,11Z"/><path class="cls-3" d="M770.68,148.15H749.51V105.42H666.87v42.73H645.7V82.22H749.51V39.07h21.17ZM666.87,72H645.7V39.48h21.17Z"/><path class="cls-3" d="M1073,77.33l-27.83-38.26h-27.82l44.43,65.53v43.55h22.43V104.6l44.43-65.53h-27.41Z"/><path class="cls-3" d="M927.64,59.83h56.89V83H938.85v20.76h10.38l40.28,44.77h27.41l-40.28-44.77h15.78a17.37,17.37,0,0,0,17.44-17.1V56.17a17.38,17.38,0,0,0-17.44-17.1H906.05V147.75h22Z"/><path class="cls-3" d="M360.43,57.39c-4.57-10.58-15.78-18.32-27.82-17.91H223.81V148.56h23.67V62.27c32.39,0,86.37-.4,87.62.41,8.3-2.44,2.49,82.22,4.15,85.07h23.67C361.67,140.42,365,62.27,360.43,57.39Z"/><path class="cls-3" d="M305.2,74.48H281.53v73.67H305.2Z"/><rect class="cls-3" x="1235.62" y="1.38" width="5" height="180"/><path class="cls-3" d="M1408,39.61c28.88,0,49.39,23.49,49.39,52.38s-20.51,52.38-49.39,52.38h-40.42a2.68,2.68,0,0,1-3-3V42.6a2.68,2.68,0,0,1,3-3H1408Zm0,94.89c23.34,0,39.21-19,39.21-42.51S1431.34,49.48,1408,49.48h-32.93v85Zm101.7,11.67A39.22,39.22,0,1,1,1549.07,107,38.9,38.9,0,0,1,1509.7,146.17Zm0-9.58A29.64,29.64,0,1,0,1480.22,107,29.2,29.2,0,0,0,1509.7,136.59ZM1633,120.43c2.09,0,3.29,1.34,2.39,3.44-5.24,13.32-18.86,22.3-34.72,22.3-22.6,0-39.37-17.06-39.37-39.21s16.77-39.22,39.37-39.22c15.86,0,29.33,9,34.72,22.3.9,2.1-.3,3.45-2.39,3.45h-4.35a3.76,3.76,0,0,1-3.59-2.25c-4.49-8.53-13.62-13.92-24.39-13.92a29.64,29.64,0,0,0,0,59.27c10.92,0,20-5.54,24.39-13.92a3.76,3.76,0,0,1,3.59-2.24Zm26.44-31.28c0,19,44,7.63,44,35.62,0,12.27-11.07,21.4-27.69,21.4-15.41,0-26-7.78-27.54-20.35-.15-2.1,1-3.15,3-3.15h3.89c1.79,0,2.69,1,3.14,2.85,1.35,8.23,9,11.07,17.51,11.07,9.43,0,17.81-3.44,17.81-11.82,0-19-44-7.64-44-35.62,0-12.28,11.08-21.41,26.19-21.41,14.07,0,24.55,7.79,26,20.36.15,2.09-1,3.14-3,3.14h-3.89c-1.8,0-2.69-1-3.14-2.84-1.35-8.23-8.83-11.08-16-11.08C1667.84,77.32,1659.46,80.77,1659.46,89.15Z"/></g></g></svg>
      </div>
      <div class="mobile">
        <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 379.08 80.17"><defs><style>.cls-1{fill:#00d3a9;}.cls-2{fill:#00b39f;}.cls-3 {fill:var(--meshery-logo-text-fill);}</style></defs><polygon class="cls-1" points="41.26 18.9 41.26 38.04 57.86 28.43 41.26 18.9"/><polygon class="cls-1" points="41.26 42.05 41.26 61.29 58.01 51.71 41.26 42.05"/><polygon class="cls-2" points="38.87 37.91 38.87 19.06 22.48 28.45 38.87 37.91"/><path class="cls-2" d="M6,61.22A40.35,40.35,0,0,0,18.71,74V53.86Z"/><polygon class="cls-2" points="38.87 61.2 38.87 42.19 22.44 51.7 38.87 61.2"/><polygon class="cls-1" points="21.1 72.81 37.74 63.3 21.1 53.68 21.1 72.81"/><polygon class="cls-2" points="59.15 72.92 59.15 53.81 42.53 63.31 59.15 72.92"/><path class="cls-2" d="M75.42,59a39.88,39.88,0,0,0,4.71-17.18l-17.32,9.9Z"/><polygon class="cls-1" points="61.54 49.7 78.23 40.15 61.54 30.55 61.54 49.7"/><polygon class="cls-2" points="59.15 26.42 59.15 7.43 42.61 16.91 59.15 26.42"/><polygon class="cls-2" points="59.15 49.61 59.15 30.45 42.57 40.05 59.15 49.61"/><polygon class="cls-2" points="40.07 80.17 40.07 80.17 40.07 80.17 40.07 80.17"/><polygon class="cls-1" points="21.1 30.41 21.1 49.72 37.8 40.05 21.1 30.41"/><path class="cls-2" d="M38.87,0A40,40,0,0,0,21.28,4.65L38.87,14.77Z"/><polygon class="cls-1" points="21.1 7.31 21.1 26.49 37.81 16.91 21.1 7.31"/><path class="cls-2" d="M18.71,6.14A40.28,40.28,0,0,0,6,18.94l12.72,7.34Z"/><path class="cls-1" d="M59,4.74A40,40,0,0,0,41.26,0V14.93Z"/><path class="cls-1" d="M0,41.48A40,40,0,0,0,4.79,59.16L17.67,51.7Z"/><path class="cls-1" d="M4.79,21A40,40,0,0,0,0,38.58L17.69,28.45Z"/><path class="cls-2" d="M21.24,75.49a39.88,39.88,0,0,0,17.63,4.66V65.41Z"/><path class="cls-1" d="M74.17,19A40.24,40.24,0,0,0,61.54,6.21v20.1Z"/><path class="cls-1" d="M61.54,74A40.34,40.34,0,0,0,74.23,61.07L61.54,53.75Z"/><path class="cls-2" d="M80.13,38.48a39.88,39.88,0,0,0-4.76-17.42L62.64,28.43Z"/><path class="cls-1" d="M41.26,80.15a39.79,39.79,0,0,0,17.59-4.64L41.26,65.34Z"/><polygon class="cls-2" points="18.71 49.54 18.71 30.61 2.27 40.04 18.71 49.54"/><polygon class="cls-3" points="269.94 29.39 269.94 30.89 269.94 37.93 269.94 46.53 269.94 59.08 303.36 59.08 303.36 52.03 276.99 52.03 276.99 46.53 276.99 44.98 297.25 44.98 297.25 37.93 276.99 37.93 276.99 30.89 303.36 30.89 303.36 23.84 269.94 23.84 269.94 29.39"/><polygon class="cls-3" points="141.41 29.39 141.41 30.89 141.41 37.93 141.41 46.53 141.41 59.08 174.83 59.08 174.83 52.03 148.46 52.03 148.46 46.53 148.46 44.98 168.72 44.98 168.72 37.93 148.46 37.93 148.46 30.89 174.83 30.89 174.83 23.84 141.41 23.84 141.41 29.39"/><path class="cls-3" d="M221.08,49.87a8.74,8.74,0,0,1-.73,3.57,9,9,0,0,1-2,2.94,9.5,9.5,0,0,1-2.93,2,9,9,0,0,1-3.6.73h-33V51.66h33a1.78,1.78,0,0,0,1.79-1.79V47a1.76,1.76,0,0,0-.52-1.27,1.73,1.73,0,0,0-1.27-.51H188.09a8.74,8.74,0,0,1-3.57-.73,9.4,9.4,0,0,1-5-5,8.9,8.9,0,0,1-.73-3.57V33.09a9.11,9.11,0,0,1,.73-3.59,9.58,9.58,0,0,1,2-2.94,9.32,9.32,0,0,1,3-2,8.9,8.9,0,0,1,3.57-.72h33v7.47h-33a1.78,1.78,0,0,0-1.79,1.78V36a1.78,1.78,0,0,0,1.79,1.79h23.73a9.11,9.11,0,0,1,3.6.72,9.59,9.59,0,0,1,2.93,2,9.41,9.41,0,0,1,2,2.94,8.9,8.9,0,0,1,.73,3.59Z"/><path class="cls-3" d="M265.54,59.08h-6.73V45.22H232.6V59.08h-6.72V37.75h32.93V23.84h6.73ZM232.6,34.44h-6.72V23.84h6.72Z"/><polygon class="cls-3" points="361.45 36.17 352.64 23.84 343.83 23.84 357.93 44.98 357.93 59.08 364.98 59.08 364.98 44.98 379.08 23.84 370.38 23.84 361.45 36.17"/><path class="cls-3" d="M315.35,30.56h18.07v7.33H318.86v6.72h3.34L335,59.08h8.7L330.9,44.61h5a5.48,5.48,0,0,0,5.48-5.48V29.31a5.47,5.47,0,0,0-5.48-5.47H308.44V59.08h7.05Z"/><path class="cls-3" d="M136,59.08h-7.47V33.38a1.94,1.94,0,0,0-.16-.8,2.15,2.15,0,0,0-1.11-1.11,1.94,1.94,0,0,0-.8-.16H91.91V23.84h34.54a9.22,9.22,0,0,1,3.69.75,9.38,9.38,0,0,1,5.1,5.1,9.22,9.22,0,0,1,.75,3.69Zm-36.6,0H91.91V31.31l7.48-2Zm18.28,0h-7.48V35.22h7.48Z"/></svg>
      </div>
    </a>

    <div id="main_navbar">
      <ul class="navbar-nav">
        <!-- 
			<li class="nav-item">
        <a class="nav-link" href="https://github.com/meshery/meshery" target="_blank"><span>GitHub</span></a>
      </li>  -->

        <!-- Internal links -->
        
        <li class="nav-item">
          <a
            class="nav-link"
            href="/installation/quick-start"
            ><span>Quick Start</span></a
          >
        </li>
        
        <li class="nav-item">
          <a
            class="nav-link"
            href="https://meshery.io"
            ><span>Website</span></a
          >
        </li>
        
        <li class="nav-item">
          <a
            class="nav-link"
            href="http://discuss.meshery.io/"
            ><span>Discuss</span></a
          >
        </li>
        
        <li class="nav-item">
          <a
            class="nav-link"
            href="https://meshery.io/catalog"
            ><span>Catalog</span></a
          >
        </li>
        
        <li class="nav-item">
          <a
            class="nav-link"
            href="https://meshery.io/blog"
            ><span>Blog</span></a
          >
        </li>
        
        
        <a href="https://play.meshery.io">
          <div class="nav-btn">Playground</div>
        </a>
        <!--Version Selector -->
        <select
          onchange="window.location=this.value"
          class="appearance-none flex-1 w-full px-0 py-1 placeholder-gray-900 tracking-wide focus:outline-none version-selector"
          name="versioningSelection"
          id="versioningSelection"
        >
          <!-- <option value="">Versions</option> -->
           <!-- we get the version selected, and put it to the right option  --><option
            
            value="/"
            class="nav-item mr-4 mb-2 mb-lg-0 text-black"
          >
            <span>latest</span>
          </option>
          <!-- we get the version selected, and put it to the right option  --><option
            
            value="/v0.6"
            class="nav-item mr-4 mb-2 mb-lg-0 text-black"
          >
            <span>v0.6</span>
          </option>
          <!-- we get the version selected, and put it to the right option  --><option
            
            value="/v0.5"
            class="nav-item mr-4 mb-2 mb-lg-0 text-black"
          >
            <span>v0.5</span>
          </option>
          <!-- we get the version selected, and put it to the right option  --><option
            
            value="/v0.4"
            class="nav-item mr-4 mb-2 mb-lg-0 text-black"
          >
            <span>v0.4</span>
          </option>
          
        </select>
      </ul>
    </div>

    <div class="icon-container">
      <button class="nav-toggle-btn nav-toggle-btn--main">
        <svg
          id="menu-nav-toggle-btn"
          xmlns="http://www.w3.org/2000/svg"
          viewBox="0 0 24 24"
          fill="none"
          stroke="currentColor"
          stroke-width="2"
          stroke-linecap="round"
          stroke-linejoin="round"
          class="feather feather-menu"
        >
          <line x1="3" y1="12" x2="21" y2="12"></line>
          <line x1="3" y1="6" x2="21" y2="6"></line>
          <line x1="3" y1="18" x2="21" y2="18"></line>
        </svg>
      </button>
      <button class="nav-mode-icon" id="mode-toggle-btn" style="text-align: center">
        <img class="nav-text" id="logo-dark-light" src="/assets/img/nav-icons/mode-toggle-icon-moon.png" 
        data-logo-for-dark="/assets/img/nav-icons/mode-toggle-icon-moon.png"
        data-logo-for-light="/assets/img/nav-icons/mode-toggle-icon-sun.png"
        />
      </button>
    </div>

    <!--Search Bar
    <div class="navbar-nav d-none d-lg-block"><input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off"></div>-->

    <!-- meshery-custom-begin
	<div class="navbar-nav d-none d-lg-block">
          <a class="gh-source" data-gh-source="github" href="https://github.com/meshery/meshery" title="Go to repository" data-md-state="done">
          <div class="gh-source__repository">
            <i class="fab fa fa-github fa-2x" style='padding-right:20px; float:left; margin-top:5px'></i>
            meshery/meshery
          <ul class="gh-source__facts"><li class="gh-source__fact" id='stars'></li><li id="forks" class="gh-source__fact"></li></ul></div></a>
        </div>
      </div>
meshery-custom-end -->
  </nav>
</header>

<!-- meshery-custom-begin
<script>
$(document).ready(function() {
  var url = "https://api.github.com/search/repositories?q=meshery/meshery";
  fetch(url, { 
      headers: {"Accept":"application/vnd.github.preview"}
  }).then(function(e) {
    return e.json()
  }).then(function(r) {
     console.log(r.items[0])
     stars = r.items[0]['stargazers_count']
     forks = r.items[0]['forks_count']
     $('#stars').text(stars + " Stars")
     $('#forks').text(forks + " Forks")
  });
});
</script>
meshery-custom-end -->


  <body class="td-section dark-mode">
    <script>
      if(localStorage.getItem("mode") == "light-mode")  {
      document.body.classList.remove("dark-mode");
      const allLogos = document.querySelectorAll("#logo-dark-light");
      allLogos.forEach(e => e.src = e.dataset.logoForLight);
  }
    </script>
    <!-- Google Tag Manager -->
    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PCGTC98C"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <!-- End Google Tag Manager -->

    <div class="flex-container">
      <div class="left-container">
        <div class="sidebar-container-wrapper">
          <div class="sidebar-container"><div class="sidebar-menu">
  <form class="sidebar__search-form">
    <input
      type="search"
      class="sidebar__search-input"
      id="sidebar-search-input"
      placeholder="Search this site..."
      aria-label="Search this site..."
      autocomplete="off"
    />
  </form>
  <!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> -->
  <script type="text/javascript">
    // <!--Ref: https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView-->
    // <!--Ref: https://stackoverflow.com/questions/11039885/scrollintoview-causing-the-whole-page-to-move-->
    (() => {
      window.addEventListener("load", function () {
        let scrollElem = document.getElementsByClassName("sidebar-nav__section-link active").item(0);
        if (scrollElem) {
         scrollElem.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "start" });
        }
        let activeSections = document.querySelectorAll(".sidebar-nav__section-link.active");
      activeSections.forEach(function (activeSection) {
        let parentCollapse = activeSection.closest(".collapse");
        if (parentCollapse) {
          parentCollapse.classList.add("show");
        }
      });
    });
  })();
  </script>

  <nav class="sidebar-nav" id="td-section-nav">
    
    <ul class="sidebar-nav__section">
       

      <li class="sidebar-nav__section-title">
        <!-- Toggle button -->
        <div class="toggle"  data-toggle="collapse" data-target="#section0" aria-expanded="false" aria-controls="section0"> ⇅ </div>
        <a
          href="/project/overview"  class="toggle"  data-toggle="collapse" data-target="#section0" aria-expanded="false" aria-controls="section0"
          class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section "
          > 🗺 Overview & Installation
        </a>
  
      
          <ul class="td-sidebar-nav__section collapse" id="section0">
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/project/faq"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >FAQs</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/installation/quick-start"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >🚀 Quick Start</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/installation"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Installation ↆ</a
              >
            </li>
              <!-- end pageurl -->
             <!--  section.links -->
          </ul>
       <!--  section.links -->
    </li>
  </ul> <!-- end of "sidebar-nav__section" -->
  
    <ul class="sidebar-nav__section">
       

      <li class="sidebar-nav__section-title">
        <!-- Toggle button -->
        <div class="toggle"  data-toggle="collapse" data-target="#section1" aria-expanded="false" aria-controls="section1"> ⇅ </div>
        <a
          href="/concepts"  class="toggle"  data-toggle="collapse" data-target="#section1" aria-expanded="false" aria-controls="section1"
          class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section "
          > 🧠 Concepts
        </a>
  
      
          <ul class="td-sidebar-nav__section collapse" id="section1">
             
            <li class="sidebar-nav__section-link  active ">
              <a
                href="/concepts/architecture"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Architectural ↆ</a
              >
            </li>
             
             <ul style="margin-bottom: 0;">

                     
                  <li id="adapters">
                  <a
                    class="sidebar-nav__section-link "
                    id="m-concepts-architectural-ↆ-adapters"
                    href="/concepts/architecture/adapters"
                    >Adapters</a>
                  </li>
                   <!-- end grandchild -->
                   
                  <li id="database">
                  <a
                    class="sidebar-nav__section-link "
                    id="m-concepts-architectural-ↆ-database"
                    href="/concepts/architecture/database"
                    >Database</a>
                  </li>
                   <!-- end grandchild -->
                   
                  <li id="operator-ↆ">
                  <a
                    class="sidebar-nav__section-link "
                    id="m-concepts-architectural-ↆ-operator-ↆ"
                    href="/concepts/architecture/operator"
                    >Operator ↆ</a>
                  </li>
                  
                  <ul style="margin-bottom: 0;">
                         
                      <li id="broker">
                        <a
                        class="sidebar-nav__section-link "
                        id="m-concepts-architectural-ↆ-broker"
                        href="/concepts/architecture/broker"
                        ><strong style="color: var(--color-secondary-medium); font-weight: normal;">Broker</strong></a
                      >
                      </li>
                         
                      <li id="meshsync">
                        <a
                        class="sidebar-nav__section-link "
                        id="m-concepts-architectural-ↆ-meshsync"
                        href="/concepts/architecture/meshsync"
                        ><strong style="color: var(--color-secondary-medium); font-weight: normal;">Meshsync</strong></a
                      >
                      </li>
                       <!-- grandchild -->
                  </ul>
                  
                   <!-- end grandchild -->
                 <!-- children -->
              </ul> 
                <!-- end children -->
                <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/concepts/logical"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Logical ↆ</a
              >
            </li>
              <!-- end pageurl -->
             <!--  section.links -->
          </ul>
       <!--  section.links -->
    </li>
  </ul> <!-- end of "sidebar-nav__section" -->
  
    <ul class="sidebar-nav__section">
       

      <li class="sidebar-nav__section-title">
        <!-- Toggle button -->
        <div class="toggle"  data-toggle="collapse" data-target="#section2" aria-expanded="false" aria-controls="section2"> ⇅ </div>
        <a
          href="/guides"  class="toggle"  data-toggle="collapse" data-target="#section2" aria-expanded="false" aria-controls="section2"
          class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section "
          > 📚 Guides & Tutorials
        </a>
  
      
          <ul class="td-sidebar-nav__section collapse" id="section2">
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/guides/infrastructure-management/overview"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >⚙️ Infrastructure Management ↆ</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/guides/configuration-management"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Configuring Kubernetes Infrastructure ↆ</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/guides/events-management"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Managing Events with Notification Center</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/guides/infrastructure-management/gitops-with-meshery"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >GitOps with Meshery</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/guides/performance-management"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Performance Management ↆ</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/guides/mesheryctl"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Using Meshery CLI Guides ↆ</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/guides/troubleshooting"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Troubleshooting Guides ↆ</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/guides/tutorials"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >🧑‍🔬 Tutorials ↆ</a
              >
            </li>
              <!-- end pageurl -->
             <!--  section.links -->
          </ul>
       <!--  section.links -->
    </li>
  </ul> <!-- end of "sidebar-nav__section" -->
  
    <ul class="sidebar-nav__section">
       

      <li class="sidebar-nav__section-title">
        <!-- Toggle button -->
        <div class="toggle"  data-toggle="collapse" data-target="#section3" aria-expanded="false" aria-controls="section3"> ⇅ </div>
        <a
          href="/extensibility"  class="toggle"  data-toggle="collapse" data-target="#section3" aria-expanded="false" aria-controls="section3"
          class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section "
          > 🛠 Integrations & Extensions
        </a>
  
      
          <ul class="td-sidebar-nav__section collapse" id="section3">
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/extensibility/api"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >APIs</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/extensibility/adapters"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Adapters ↆ</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/extensibility/integrations"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Integrations</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/extensibility/load-generators"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Load Generators</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/extensibility/providers"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Providers</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/extensibility/ui"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >UI Plugins</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/extensions"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >🦾 Extensions ↆ</a
              >
            </li>
              <!-- end pageurl -->
             <!--  section.links -->
          </ul>
       <!--  section.links -->
    </li>
  </ul> <!-- end of "sidebar-nav__section" -->
  
    <ul class="sidebar-nav__section">
       

      <li class="sidebar-nav__section-title">
        <!-- Toggle button -->
        <div class="toggle"  data-toggle="collapse" data-target="#section4" aria-expanded="false" aria-controls="section4"> ⇅ </div>
        <a
          href="/project"  class="toggle"  data-toggle="collapse" data-target="#section4" aria-expanded="false" aria-controls="section4"
          class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section "
          > 🧑‍💻 Contributing & Community
        </a>
  
      
          <ul class="td-sidebar-nav__section collapse" id="section4">
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/project/community"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Community</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/project/contributing"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Contributing ↆ</a
              >
            </li>
              <!-- end pageurl -->
             <!--  section.links -->
          </ul>
       <!--  section.links -->
    </li>
  </ul> <!-- end of "sidebar-nav__section" -->
  
    <ul class="sidebar-nav__section">
       

      <li class="sidebar-nav__section-title">
        <!-- Toggle button -->
        <div class="toggle"  data-toggle="collapse" data-target="#section5" aria-expanded="false" aria-controls="section5"> ⇅ </div>
        <a
          href="/reference"  class="toggle"  data-toggle="collapse" data-target="#section5" aria-expanded="false" aria-controls="section5"
          class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section "
          > 📖 Reference
        </a>
  
      
          <ul class="td-sidebar-nav__section collapse" id="section5">
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/reference/error-codes"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Error Code Reference</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/reference/permissions"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Permissions Keys Reference</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/extensibility/api"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >REST & GraphQL APIs ↆ</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/reference/mesheryctl"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >CLI Command Reference</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/reference/meshery-operator-crds"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Meshery Operator CRDs</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/project/releases"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Releases</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/project/security-vulnerabilities"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Vulnerabilities</a
              >
            </li>
              <!-- end pageurl -->
             <!--  section.links -->
          </ul>
       <!--  section.links -->
    </li>
  </ul> <!-- end of "sidebar-nav__section" -->
  
</nav>
</div>
</div>
        </div>

        <div class="icon-container">
          <button class="nav-toggle-btn nav-toggle-btn--document">
            <?xml version="1.0" encoding="utf-8"?>
              <svg version="1.1" id="document-nav-toggle-btn" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
                x="0px" y="0px" viewBox="0 0 10.7 18.7" style="enable-background:new 0 0 10.7 18.7;" xml:space="preserve">
              <style type="text/css">
                .st0{stroke:#000000;stroke-width:1.5;stroke-miterlimit:10;}
              </style>
              <path class="st0" d="M8.1,9.4L1,1.9C0.7,1.7,0.7,1.2,1,1c0.3-0.3,0.7-0.3,1,0c0,0,0,0,0,0l7.8,7.9c0.3,0.3,0.3,0.7,0,1l-7.8,7.9
                c-0.3,0.3-0.7,0.3-1,0c0,0,0,0,0,0c-0.3-0.3-0.3-0.7,0-1L8.1,9.4z"/>
              </svg>
          </button>
        </div>
      </div>
      <main class="main-container" role="main">
        <nav aria-label="breadcrumb">
          <ol class="breadcrumb spb-1">
            <li class="breadcrumb-item active" aria-current="page"><div id="breadcrumbs">


   <a href="/">home</a>


  
    / <a href="/concepts">concepts</a> 
  

  
    / architecture
  

</div>

<!-- <a href="http://idratherbewriting.com" class="noCrossRef productSubtitle"> Home </a> > <a class="noCrossRef productSubtitle" href="http://localhost:4000">Learn API Doc</a> > architecture -->
</li>
          </ol>
        </nav>
        <div class="td-content">
          
          <h1>Architecture</h1>
           <h2 id="components-their-purpose-and-languages">Components, their Purpose, and Languages</h2>

<p>Meshery and its components are written using the following languages and technologies.</p>

<table>
  <thead>
    <tr>
      <th style="text-align: left">Components</th>
      <th style="text-align: left">Languages and Technologies</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left">Meshery Server</td>
      <td style="text-align: left">Golang, gRPC, GraphQL, <a href="https://smp-spec.io">SMP</a></td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="/concepts/architecture/adapters">Meshery Adapters</a></td>
      <td style="text-align: left">Golang, gRPC, <a href="https://cloudevents.io/">CloudEvents</a>, <a href="https://smi-spec.io">SMI</a>, <a href="https://oam.dev">OAM</a></td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://github.com/layer5io/wasm-filters">Meshery WASM Filters</a></td>
      <td style="text-align: left">Rust and C++</td>
    </tr>
    <tr>
      <td style="text-align: left">Meshery UI</td>
      <td style="text-align: left">ReactJS, NextJS, BillboardJS</td>
    </tr>
    <tr>
      <td style="text-align: left">Meshery Provider UI</td>
      <td style="text-align: left">ReactJS, NextJS</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="/extensibility/providers">Meshery Remote Providers</a></td>
      <td style="text-align: left"><em>any</em> - must adhere to Meshery <a href="/extensibility">Extension Points</a></td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="/concepts/architecture/operator">Meshery Operator</a></td>
      <td style="text-align: left">Golang</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="/concepts/architecture/meshsync">MeshSync</a></td>
      <td style="text-align: left">Golang</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="/concepts/architecture/broker">Broker</a></td>
      <td style="text-align: left">Golang, NATS</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="/concepts/architecture/database">Meshery Database</a></td>
      <td style="text-align: left">Golang, SQLlite</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="#meshery-cli">Meshery CLI</a></td>
      <td style="text-align: left">Golang</td>
    </tr>
  </tbody>
</table>

<h2 id="deployments">Deployments</h2>

<p>Meshery deploys as a set of containers. Meshery’s containers can be deployed to either Docker or Kubernetes. Meshery components connect to one another via gRPC requests. Meshery Server stores the location of the other components and connects with those components as needed. Typically, a connection from Meshery Server to Meshery Adapters is initiated from a client request (usually either <code class="language-plaintext highlighter-rouge">mesheryctl</code> or Meshery UI) to gather information from the Adapter or invoke an Adapter’s operation.</p>

<h3 id="adapters">Adapters</h3>

<p>In Meshery v0.6.0, Adapters will register with Meshery Server over HTTP POST. If Meshery Server is not available, Meshery Adapters will backoff and retry to connect to Meshery Server perpetually.</p>

<p><a href="/assets/img/architecture/meshery-architecture.svg" class="lightbox-image">
<img src="/assets/img/architecture/meshery-architecture.svg" width="50%" /></a></p>

<p><em>Figure: Meshery deploys inside or outside of a Kubernetes cluster</em></p>

<h4 id="adapters-and-capabilities-registry">Adapters and Capabilities Registry</h4>

<p>Each Meshery Adapter delivers its own unique specific functionality. As such, at time of deployment, the Meshery Adapter will register its cloud native infrastructure-specific capabilities (its operations) with Meshery Server’s capability registry.</p>

<p><a href="/assets/img/adapters/meshery-adapter-operation-registration.svg" class="lightbox-image">
<img src="/assets/img/adapters/meshery-adapter-operation-registration.svg" width="50%" /></a></p>

<p><em>Figure: Meshery Adapter Operation Registration</em></p>

<h3 id="clients">Clients</h3>

<p>Meshery’s REST API may be consumed by any number of clients. Clients need to present valid JWT token.</p>

<p><a href="/assets/img/architecture/Meshery-client-architecture.svg" class="lightbox-image">
<img src="/assets/img/architecture/Meshery-client-architecture.svg" width="50%" /></a></p>

<p><em>Figure: Clients use Meshery’s <a href="extensibility/api#rest">REST API</a>, <a href="extensibility/api#graphql">GraphQL API</a>, or a combination of both.</em></p>

<h3 id="providers">Providers</h3>

<p>As a point of extensibility, Meshery supports two types of <a href="/extensibility/providers">providers</a>: <em>Local</em> and <em>Remote</em>.</p>

<p><a href="/assets/img/architecture/Meshery-provider-architecture.svg" class="lightbox-image">
<img src="/assets/img/architecture/Meshery-provider-architecture.svg" width="50%" /></a></p>
<figure>
  <figcaption>Figure: Meshery Provider architecture</figcaption>
</figure>

<h2 id="object-model">Object Model</h2>

<p>This diagram outlines logical constructs within Meshery and their relationships.</p>

<p><a href="/assets/img/architecture/meshery_extension_points.svg" class="lightbox-image">
<img src="/assets/img/architecture/meshery_extension_points.svg" width="50%" /></a></p>
<figure>
  <figcaption>Figure: Meshery Object Model</figcaption>
</figure>

<h2 id="meshery-operator-and-meshsync">Meshery Operator and MeshSync</h2>

<p>Meshery Operator is the multi-cluster Kubernetes operator that manages MeshSync and Meshery Broker.</p>

<p><a href="/assets/img/architecture/meshery-operator-and-meshsync.svg" class="lightbox-image">
<img src="/assets/img/architecture/meshery-operator-and-meshsync.svg" width="50%" /></a></p>
<figure>
  <figcaption>Figure: Meshery Operator and MeshSync</figcaption>
</figure>

<p>See the <a href="/concepts/architecture/operator"><strong>Operator</strong></a> section for more information on the function of an operator and <a href="/concepts/architecture/meshsync"><strong>MeshSync</strong></a> section for more information on the function of meshsync.</p>

<h2 id="database">Database</h2>

<p>Meshery Server’s database is responsible for collecting and centralizing the state of all elements under management, including infrastructure, application, and Meshery’s own components. Meshery’s database, while persisted to file, is treated as a cache.</p>

<p><a href="/assets/img/architecture/meshery-database.svg" class="lightbox-image">
<img src="/assets/img/architecture/meshery-database.svg" width="50%" /></a></p>
<figure>
  <figcaption>Figure: Meshery Docker Extension</figcaption>
</figure>

<p><em>See the <a href="/concepts/architecture/database"><strong>Database</strong></a> section for more information on the function of the database.</em></p>

<h2 id="meshery-docker-extension">Meshery Docker Extension</h2>

<p>Meshery’s Docker extension provides a simple and flexible way to design and operate cloud native infrastructure on top of Kubernetes using Docker containers. The architecture of this extension is designed to be modular and extensible, with each component serving a specific purpose within the overall deployment process.</p>

<p><a href="/assets/img/architecture/meshery-docker-extension.svg" class="lightbox-image">
<img src="/assets/img/architecture/meshery-docker-extension.svg" width="50%" /></a></p>
<figure>
  <figcaption>Figure: Meshery Docker Extension</figcaption>
</figure>

<h2 id="meshery-cli">Meshery CLI</h2>

<p>The Command Line Interface ( also known as <a href="/guides/mesheryctl/working-with-mesheryctl">mesheryctl</a> ) that is used to manage Meshery. Use <code class="language-plaintext highlighter-rouge">mesheryctl</code> to both manage the lifecycle of Meshery itself and to access and invoke any of Meshery’s application and cloud native management functions.</p>

<h3 id="statefulness-in-meshery-components"><strong>Statefulness in Meshery components</strong></h3>

<p>Some components within Meshery’s architecture are concerned with persisting data while others are only
concerned with a long-lived configuration, while others have no state at all.</p>

<table>
  <thead>
    <tr>
      <th style="text-align: left">Components</th>
      <th style="text-align: left">Persistence</th>
      <th style="text-align: left">Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left"><a href="/guides/mesheryctl/working-with-mesheryctl">mesheryctl</a></td>
      <td style="text-align: left">stateless</td>
      <td style="text-align: left">command line interface that has a configuration file</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="/concepts/architecture/adapters">Meshery Adapters</a></td>
      <td style="text-align: left">stateless</td>
      <td style="text-align: left">interface with cloud native infrastructure on a transactional basis</td>
    </tr>
    <tr>
      <td style="text-align: left">Meshery Server</td>
      <td style="text-align: left">caches state</td>
      <td style="text-align: left">application cache is stored in <code class="language-plaintext highlighter-rouge">$HOME/.meshery/</code> folder</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="/extensibility/providers">Meshery Providers</a></td>
      <td style="text-align: left">stateful</td>
      <td style="text-align: left">location of persistent user preferences, environment, tests and so on</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="/concepts/architecture/operator">Meshery Operator</a></td>
      <td style="text-align: left">stateless</td>
      <td style="text-align: left">operator of Meshery custom controllers, notably MeshSync</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="/concepts/architecture/meshsync">MeshSync</a></td>
      <td style="text-align: left">stateless</td>
      <td style="text-align: left">Kubernetes custom controller, continuously running discovery</td>
    </tr>
  </tbody>
</table>

<h3 id="network-ports"><strong>Network Ports</strong></h3>

<p>Meshery uses the following list of network ports to interface with its various components:</p>

<table>
  <thead>
    <tr>
      <th style="text-align: left">Component</th>
      <th style="text-align: center">Port</th>
      <th style="text-align: left">Purpose</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left">Meshery Server</td>
      <td style="text-align: center">9081/tcp</td>
      <td style="text-align: left">UI, REST and GraphQL APIs</td>
    </tr>
    <tr>
      <td style="text-align: left">Meshery Server</td>
      <td style="text-align: center">80/tcp</td>
      <td style="text-align: left">Websocket</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="/concepts/architecture/broker">Meshery Broker</a></td>
      <td style="text-align: center">4222/tcp</td>
      <td style="text-align: left">Client communication with Meshery Server</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="/concepts/architecture/broker">Meshery Broker</a></td>
      <td style="text-align: center">8222/tcp</td>
      <td style="text-align: left">HTTP management port for monitoring Meshery Broker. Available as of Meshery v0.5.0</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="/concepts/architecture/broker">Meshery Broker</a></td>
      <td style="text-align: center">6222/tcp</td>
      <td style="text-align: left">Routing port for Broker clustering. Unused as of Meshery v0.6.0-rc-2</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="/concepts/architecture/broker">Meshery Broker</a></td>
      <td style="text-align: center">7422/tcp</td>
      <td style="text-align: left">Incoming/outgoing leaf node connections. Unused as of Meshery v0.6.0-rc-2</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="/concepts/architecture/broker">Meshery Broker</a></td>
      <td style="text-align: center">7522/tcp</td>
      <td style="text-align: left">Gateway to gateway communication. Unused as of Meshery v0.6.0-rc-2</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="/concepts/architecture/broker">Meshery Broker</a></td>
      <td style="text-align: center">7777/tcp</td>
      <td style="text-align: left">used for Prometheus NATS Exporter. Unused as of Meshery v0.6.0-rc-2</td>
    </tr>
    <tr>
      <td style="text-align: left">Learn Meshery Application</td>
      <td style="text-align: center">10011/tcp</td>
      <td style="text-align: left">SMI conformance testing</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="(/extensibility/providers)">Meshery Remote Providers</a></td>
      <td style="text-align: center">443/tcp</td>
      <td style="text-align: left">e.g. Meshery Cloud</td>
    </tr>
    <tr>
      <td style="text-align: left"><img src="/assets/img/service-meshes/app-mesh.svg" style="width:20px" data-logo-for-dark="/assets/img/service-meshes/app-mesh-white.svg" data-logo-for-light="/assets/img/service-meshes/app-mesh.svg" id="logo-dark-light" loading="lazy" /> <a href="/extensibility/adapters/app-mesh">Meshery Adapter for App Mesh</a></td>
      <td style="text-align: center">10005/gRPC</td>
      <td style="text-align: left">Communication with Meshery Server</td>
    </tr>
    <tr>
      <td style="text-align: left"><img src="/assets/img/service-meshes/cilium.svg" style="width:20px" data-logo-for-dark="/assets/img/service-meshes/cilium-white.svg" data-logo-for-light="/assets/img/service-meshes/cilium.svg" id="logo-dark-light" loading="lazy" /> <a href="/extensibility/adapters/cilium">Meshery Adapter for Cilium Service Mesh</a></td>
      <td style="text-align: center">10012/gRPC</td>
      <td style="text-align: left">Communication with Meshery Server</td>
    </tr>
    <tr>
      <td style="text-align: left"><img src="/assets/img/service-meshes/consul.svg" style="width:20px" data-logo-for-dark="/assets/img/service-meshes/consul-white.svg" data-logo-for-light="/assets/img/service-meshes/consul.svg" id="logo-dark-light" loading="lazy" /> <a href="/extensibility/adapters/consul">Meshery Adapter for Consul</a></td>
      <td style="text-align: center">10002/gRPC</td>
      <td style="text-align: left">Communication with Meshery Server</td>
    </tr>
    <tr>
      <td style="text-align: left"><img src="/assets/img/service-meshes/istio.svg" style="width:20px" data-logo-for-dark="/assets/img/service-meshes/istio-white.svg" data-logo-for-light="/assets/img/service-meshes/istio.svg" id="logo-dark-light" loading="lazy" /> <a href="/extensibility/adapters/istio">Meshery Adapter for Istio</a></td>
      <td style="text-align: center">10000/gRPC</td>
      <td style="text-align: left">Communication with Meshery Server</td>
    </tr>
    <tr>
      <td style="text-align: left"><img src="/assets/img/service-meshes/kuma.svg" style="width:20px" data-logo-for-dark="/assets/img/service-meshes/kuma-white.svg" data-logo-for-light="/assets/img/service-meshes/kuma.svg" id="logo-dark-light" loading="lazy" /> <a href="/extensibility/adapters/kuma">Meshery Adapter for Kuma</a></td>
      <td style="text-align: center">10007/gRPC</td>
      <td style="text-align: left">Communication with Meshery Server</td>
    </tr>
    <tr>
      <td style="text-align: left"><img src="/assets/img/service-meshes/linkerd.svg" style="width:20px" data-logo-for-dark="/assets/img/service-meshes/linkerd-white.svg" data-logo-for-light="/assets/img/service-meshes/linkerd.svg" id="logo-dark-light" loading="lazy" /> <a href="/extensibility/adapters/linkerd">Meshery Adapter for Linkerd</a></td>
      <td style="text-align: center">10001/gRPC</td>
      <td style="text-align: left">Communication with Meshery Server</td>
    </tr>
    <tr>
      <td style="text-align: left"><img src="/assets/img/service-meshes/nginx-sm.svg" style="width:20px" data-logo-for-dark="/assets/img/service-meshes/nginx-sm-white.svg" data-logo-for-light="/assets/img/service-meshes/nginx-sm.svg" id="logo-dark-light" loading="lazy" /> <a href="/extensibility/adapters/nginx-sm">Meshery Adapter for NGINX Service Mesh</a></td>
      <td style="text-align: center">10010/gRPC</td>
      <td style="text-align: left">Communication with Meshery Server</td>
    </tr>
    <tr>
      <td style="text-align: left"><img src="/assets/img/adapters/nighthawk/nighthawk.svg" style="width:20px" data-logo-for-dark="/assets/img/adapters/nighthawk/nighthawk-white.svg" data-logo-for-light="/assets/img/adapters/nighthawk/nighthawk.svg" id="logo-dark-light" loading="lazy" /> <a href="/extensibility/adapters/nighthawk">Meshery Adapter for Nighthawk</a></td>
      <td style="text-align: center">10013/gRPC</td>
      <td style="text-align: left">Communication with Meshery Server</td>
    </tr>
    <tr>
      <td style="text-align: left"><img src="/assets/img/service-meshes/nsm.svg" style="width:20px" data-logo-for-dark="/assets/img/service-meshes/nsm.svg" data-logo-for-light="/assets/img/service-meshes/nsm.svg" id="logo-dark-light" loading="lazy" /> <a href="/extensibility/adapters/nsm">Meshery Adapter for Network Service Mesh</a></td>
      <td style="text-align: center">10004/gRPC</td>
      <td style="text-align: left">Communication with Meshery Server</td>
    </tr>
    <tr>
      <td style="text-align: left"><img src="/assets/img/service-meshes/osm.svg" style="width:20px" data-logo-for-dark="/assets/img/service-meshes/osm.svg" data-logo-for-light="/assets/img/service-meshes/osm.svg" id="logo-dark-light" loading="lazy" /> <a href="/extensibility/adapters/osm">Meshery Adapter for Open Service Mesh</a></td>
      <td style="text-align: center">10009/gRPC</td>
      <td style="text-align: left">Communication with Meshery Server</td>
    </tr>
    <tr>
      <td style="text-align: left"><img src="/assets/img/service-meshes/tanzu.svg" style="width:20px" data-logo-for-dark="/assets/img/service-meshes/tanzu.svg" data-logo-for-light="/assets/img/service-meshes/tanzu.svg" id="logo-dark-light" loading="lazy" /> <a href="/extensibility/adapters/tanzu-sm">Meshery Adapter for Tanzu Service Mesh</a></td>
      <td style="text-align: center">10011/gRPC</td>
      <td style="text-align: left">Communication with Meshery Server</td>
    </tr>
    <tr>
      <td style="text-align: left"><img src="/assets/img/service-meshes/traefik-mesh.svg" style="width:20px" data-logo-for-dark="/assets/img/service-meshes/traefik-mesh.svg" data-logo-for-light="/assets/img/service-meshes/traefik-mesh.svg" id="logo-dark-light" loading="lazy" /> <a href="/extensibility/adapters/traefik-mesh">Meshery Adapter for Traefik Mesh</a></td>
      <td style="text-align: center">10006/gRPC</td>
      <td style="text-align: left">Communication with Meshery Server</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="/tasks/performance/managing-performance">Meshery Perf</a></td>
      <td style="text-align: center">10013/gRPC</td>
      <td style="text-align: left">Performance Management</td>
    </tr>
  </tbody>
</table>

<p>See the <a href="/concepts/architecture/adapters"><strong>Adapters</strong></a> section for more information on the function of an adapter.</p>

<h3 id="meshery-connections-and-their-actions"><strong>Meshery Connections and their Actions</strong></h3>

<table style=" padding-right: 10px;
        margin: 5px 5px 5px 5px;
        display: block;
        max-width: fit-content;
        overflow-x: auto;
        white-space: nowrap;">
  <thead>
    <tr>
      <th>Connection Type</th>
      <th>&nbsp;</th>
      <th>&nbsp;</th>
      <th>Action / Behaviour</th>
      <th>&nbsp;</th>
      <th>&nbsp;</th>
      <th>&nbsp;</th>
      <th>&nbsp;</th>
      <th>&nbsp;</th>
      <th>&nbsp;</th>
      <th>&nbsp;</th>
      <th>&nbsp;</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>&nbsp;</td>
      <td><strong>Connect mesheryctl</strong></td>
      <td><strong>Connect Meshery UI</strong></td>
      <td><strong>Disconnect</strong></td>
      <td><strong>Ad hoc Connectivity Test</strong></td>
      <td><strong>Ongoing Connectivity Test</strong></td>
      <td><strong>Synthetic Check</strong></td>
      <td><strong>Deploy mesheryctl</strong></td>
      <td><strong>Undeploy mesheryctl</strong></td>
      <td><strong>Deploy Meshery UI</strong></td>
      <td><strong>Undeploy Meshery UI</strong></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Kubernetes clusters</td>
      <td>`system start`</td>
      <td>Upload kubeconfig</td>
      <td>Click "X" on chip</td>
      <td>On click of connection chip</td>
      <td>Yes, via MeshSync</td>
      <td>No</td>
      <td>No</td>
      <td>No</td>
      <td>No</td>
      <td>No</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Grafana Servers</td>
      <td>No</td>
      <td>Enter IP/hostname into Meshery UI</td>
      <td>Click "X" on chip</td>
      <td>On click of connection chip</td>
      <td>No</td>
      <td>No</td>
      <td>No</td>
      <td>No</td>
      <td>No</td>
      <td>No</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Prometheus Servers</td>
      <td>No</td>
      <td>Enter IP/hostname into Meshery UI</td>
      <td>Click "X" on chip</td>
      <td>On click of connection chip</td>
      <td>Yes, when metrics are configured in a dashboard</td>
      <td>Yes</td>
      <td>No</td>
      <td>No</td>
      <td>No</td>
      <td>No</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td><a href="/concepts/architecture/adapters">Meshery Adapters</a></td>
      <td>`system check`</td>
      <td>Server to Adapter on every UI refresh</td>
      <td>Click "X on" chip</td>
      <td>Server to Adapter every click on adapter chip in UI</td>
      <td>Server to Adapter every 10 seconds</td>
      <td>-</td>
      <td>Yes, as listed in meshconfig contexts</td>
      <td>Yes, as listed in meshconfig contexts</td>
      <td>Toggle switch needed</td>
      <td>Toggle switch needed</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td><a href="/concepts/architecture/operator">Meshery Operator</a></td>
      <td>`system check`</td>
      <td>Upon upload of kubeconfig</td>
      <td>No</td>
      <td>On click of connection chip in UI to Server to Kubernetes to Meshery Operator</td>
      <td>No</td>
      <td>-</td>
      <td>`system start`</td>
      <td>`system stop`</td>
      <td>Upon upload of kubeconfig &amp; Toggle of switch</td>
      <td>Toggle of switch</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td><a href="/concepts/architecture/meshsync">MeshSync</a></td>
      <td>`system check`</td>
      <td>follows the lifecycle of Meshery Operator</td>
      <td>No</td>
      <td>On click of connection chip in UI to Server to Kubernetes to Meshery Operator to MeshSync</td>
      <td>Managed by Meshery Operator</td>
      <td>On click of connection chip</td>
      <td>follows the lifecycle of Meshery Operator</td>
      <td>follows the lifecycle of Meshery Operator</td>
      <td>follows the lifecycle of Meshery Operator</td>
      <td>follows the lifecycle of Meshery Operator</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td><a href="/concepts/architecture/broker">Broker</a></td>
      <td>`system check`</td>
      <td>follows the lifecycle of Meshery Operator</td>
      <td>No</td>
      <td>On click of connection chip in UI to Server to Brokers exposed service port</td>
      <td>NATS Topic Subscription</td>
      <td>On click of connection chip</td>
      <td>follows the lifecycle of Meshery Operator</td>
      <td>follows the lifecycle of Meshery Operator</td>
      <td>follows the lifecycle of Meshery Operator</td>
      <td>follows the lifecycle of Meshery Operator</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>
<p><br /></p>

<p>Please also see the <a href="https://docs.google.com/document/d/1q-aayRqx3QKIk2soTaTTTH-jmHcVXHwNYFsYkFawaME/edit#heading=h.ngupcd4j1pfm">Troubleshooting Toolkit</a> and the <a href="http://discuss.meshery.io/t/meshery-v0-7-0-connection-states-kubnernetes-design-review/958">Meshery v0.7.0: Connection States (Kubnernetes) Design Review</a></p>
   
           
          <br/>


        </div>
      </main>
      
      <div class="content-table-wrapper">
        <div class="content-table">
          <div class="content-table__editable"><strong>Tools</strong>
<a href="https://github.com/meshery/meshery/issues/new?assignees=&labels=area%2Fdocs%2C+framework%2Fjekyll&template=documentation.md&title=%5BDocs%5D" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i> Create doc issue</a>
<a href="https://github.com/meshery/meshery/blob/master/docs/pages/concepts/architectural/architecture.md" rel="noopener" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/meshery/meshery/new/master/docs/pages/concepts/architectural/architecture.md?filename=change-me.md&value=---%0Atitle%3A+%22Long+Page+Title%22%0AlinkTitle%3A+%22Short+Nav+Title%22%0Aweight%3A+100%0Adescription%3A+%3E-%0A+++++Page+description+for+heading+and+indexes.%0A---%0A%0A%23%23+Heading%0A%0AEdit+this+template+to+create+your+new+page.%0A%0A%2A+Give+it+a+good+name%2C+ending+in+%60.md%60+-+e.g.+%60getting-started.md%60%0A%2A+Edit+the+%22front+matter%22+section+at+the+top+of+the+page+%28weight+controls+how+its+ordered+amongst+other+pages+in+the+same+directory%3B+lowest+number+first%29.%0A%2A+Add+a+good+commit+message+at+the+bottom+of+the+page+%28%3C80+characters%3B+use+the+extended+description+field+for+more+detail%29.%0A%2A+Create+a+new+branch+so+you+can+preview+your+new+file+and+request+a+review+via+Pull+Request.%0A" rel="noopener" target="_blank"><i class="fa fa-plus fa-fw"></i> Create new page</a>


<!-- this will parse through the header fields and add a button to open
     an issue / ask a question on Github. The editable field should be in
     the post frontend matter, and refer to the label to open the issue for -->
     
</div>
          <nav id="TableOfContents">
            <strong>Contents</strong>
            <ul>
              <li>
                <ul id="TOC">
                  <!-- Links will be appended here-->
                </ul>
              </li>
            </ul>
          </nav>
        </div>
      </div>
      
    </div>
    <footer class="footer">
  <!-- meshery-custom-begin"
      <div class="col-6 col-sm-4 text-xs-center order-sm-2">

<ul class="list-inline mb-0">
  <li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="" aria-label="Twitter" data-original-title="Twitter">
    <a class="text-white" target="_blank" href="https://twitter.com/https://twitter.com/mesheryio">
      <i class="fab fa-twitter"></i>
    </a>
  </li>
</ul>
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
<ul class="list-inline mb-0">
  <li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="" aria-label="GitHub" data-original-title="GitHub">
    <a class="text-white" target="_blank" href="https://github.com/meshery/meshery">
      <i class="fab fa-github"></i>
    </a>
  </li>
</ul>
meshery-custom-end -->
  <div class="text-white">&copy; 2025 The Meshery Authors</div>
  

  <!-- meshery-custom-begin -->

  <div class="footer-icons-list">
    <div class="footer-icons">
      <a class="social__link social__link--forum" href="http://discuss.meshery.io" target="_blank" rel="noreferrer">
        <img
          src=""
          alt="forum"
        />
        <span class="footer-icons-text">Community discussion forum</span>
      </a>
    </div>

    <div class="footer-icons">
      <a class="social__link social__link--mail" href="https://meshery.io/subscribe" target="_blank" rel="noreferrer">
        <img
          src=""
          alt="mail"
        />
        <span class="footer-icons-text">Get connected with the community</span>
      </a>
    </div>

    <div class="footer-icons">
      <a class="social__link social__link--slack" href=" https://slack.meshery.io/" target="_blank" rel="noreferrer">
        <img
          class="slack"
          src=""
          alt="slack"
        />
        <span class="footer-icons-text">Join the Meshery Slack</span>
      </a>
    </div>

    <div class="footer-icons">
      <a class="social__link" href="https://meshery.io/calendar">
        <svg fill="#666666" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
          <path
            d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z"
          />
          <g stroke-linecap="undefined" stroke-linejoin="undefined">
            <path d="M-3.468 8.168h-.033m25.313-4.242l-.063-.254M7.858 4.814v9.387" />
            <path d="M1.833 9.507h12.051" />
          </g>
        </svg>
        <span class="footer-icons-text">Subscribe to the community calendar</span>
      </a>
    </div>

    <div class="footer-icons">
      <a class="social__link" href="https://twitter.com/mesheryio" target="_blank" rel="noreferrer">
       <svg alt="twitter" class="twitter" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" version="1.1" height="1.8em"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" fill="#666666"></path></svg>
       <span class="footer-icons-text">Follow on Twitter</span>
      </a>
    </div>

    <div class="footer-icons">
      <a class="social__link" href="https://github.com/meshery" target="_blank" rel="noreferrer">
        <img
          class="github"
          src=""
          alt="github"
        />
        <span class="footer-icons-text">Contribute on GitHub</span>
      </a>
    </div>

    <div class="footer-icons">
      <a class="social__link" href="https://www.linkedin.com/showcase/meshery/" target="_blank" rel="noreferrer">
        <img
          class="linkedin"
          src=""
          alt="linkedin"
        />
        <span class="footer-icons-text">Connect on LinkedIn</span>
      </a>
    </div>

    <div class="footer-icons">
      <a
        class="social__link"
        href="https://www.youtube.com/mesheryio?sub_confirmation=1"
        target="_blank"
        rel="noreferrer"
      >
        <img
          class="youtube"
          src=""
          alt="youtube"
        />
        <span class="footer-icons-text">Watch community meeting recordings</span>
      </a>
    </div>

    <div class="footer-icons">
      <a class="social__link" href="https://hub.docker.com/u/meshery/" target="_blank" rel="noreferrer">
        <img
          class="docker"
          src=""
          alt="docker"
        />
        <span class="footer-icons-text">Access Docker images</span>
      </a>
    </div>
  </div>
  <!-- meshery-custom-end -->
</footer>

<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/clipboard@1/dist/clipboard.min.js"></script>

<script type="text/javascript" src="/assets/js/lightbox.js"></script>
<link rel="stylesheet" href="/assets/css/lightbox.css" />
<script type="module" src="https://md-block.verou.me/md-block.js"></script>

 <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/assets/js/main.js"></script>
<script src="/assets/js/navbar.js"></script>

 <script async src='https://www.google-analytics.com/analytics.js'></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
	window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
	ga('create', 'UA-00000000-0', 'auto');
	ga('send', 'pageview');
}
</script>

  </body>
</html>
<script
  src="https://code.jquery.com/jquery-3.3.1.min.js"
  integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
  crossorigin="anonymous"></script>

<script>
$(document).ready(function() {

    var toc = $('#TOC');

    // Select each header
    sections = $('.td-content h1');
        $.each(sections, function(idx, v) {
            section = $(v);
            var div_id = $(section).attr('id');
            if(!section.hasClass('noTOC')){
               var div_text = section.text().split('¶')[0];
              var parent = $("#" + div_id)
              var content = '<li id="link_' + div_id + '" class="md-nav__item"><a class="md-nav__link" href="#' + div_id + '" title="' + div_text +'">' + div_text +'</a>asdf</li>';
              $(document).find(toc).append(content);
            }

            // Add section code to subnavigation
            var children = $('<nav class="md-nav"><ul class="md-nav__list"></nav></ul>')
            var contenders = $("#" + div_id).nextUntil("h1");
            $.each(contenders, function(idx, contender){
               if( !$(contender).hasClass("noTOC") && ($(contender).is('h2') || $(contender).is('h3')) ) {
                   var contender_id = $(contender).attr('id');
                   var contender_text = $(contender).text().split('¶')[0];
                   var content = '<li class="md-nav__item"><a class="md-nav__link" href="#' + contender_id + '" title="' + contender_text +'">' + contender_text +'</a></li>';
                   children.append(content);
                }
             })
             $("#link_" + div_id).append(children);
        });
        //added 'selected' tag to the first element of toc
        $('.md-nav__link').first().addClass('selected');

        $(window).scroll(function(e){
          // Detect how far are we from the top of the page
          let windowTop = $(this).scrollTop();
          // Loop through every navigation menu item
          $('.md-nav__link').each(function (event) {       
              if (windowTop >= $($(this).attr('href')).offset().top - 100) {
              // Remove 'selected' from previously highlighted menu items
              $('.selected').removeClass('selected');
              // Highlight the current menu item by adding 'selected' class
              $(this).addClass('selected');
          }
          if($(window).scrollTop() + $(window).height() > $(document).height() - 10) {
            $('.selected').removeClass('selected');
              $(this).addClass('selected');
          }
        });
      })
      // Smooth scroll to target section when clicking on TOC link
      $('a[href^="#"]').on('click', function(event) {
        event.preventDefault();
        var target = $(this.hash);
        if (target.length) {
          $('html, body').animate({
          scrollTop: target.offset().top - 70
          }, 1000);
        }
      });
    });
</script>

